﻿@using AutoPartsSearch.Domain.Entities.Enums
@model AutoPartsSearch.Web.ViewModels.AccountModels.SellerInfo
@using (Html.BeginForm("UpdateAccount", "Account"))
{
    Html.ValidationSummary(true);
    <fieldset>
        <table id="step1" class="table-form">
            <tbody>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.CompanyName)
                    </td>
                    <td>
                        @Html.DisplayFor(model => model.CompanyName)
                        @Html.HiddenFor(model => model.CompanyName)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.FullName)
                    </td>
                    <td>
                        @Html.EditorFor(x => x.FullName)
                        @Html.ValidationMessageFor(model => model.FullName)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.Adress)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.Adress)
                        @Html.ValidationMessageFor(model => model.Adress)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.City)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.City)
                        @Html.ValidationMessageFor(model => model.City)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.Site)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.Site)
                        @Html.ValidationMessageFor(model => model.Site)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.CarBrands)
                    </td>
                    <td>
                        @Html.ListBoxFor(model => model.CarBrands, Enumerable.Empty<SelectListItem>())
                        @Html.ValidationMessageFor(model => model.CarBrands)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.PartGroups)
                    </td>
                    <td>
                        @Html.ListBoxFor(model => model.PartGroups, Enumerable.Empty<SelectListItem>())
                        @Html.ValidationMessageFor(model => model.PartGroups)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.IsDeliveryOnlyToRegion)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.IsDeliveryOnlyToRegion)
                        @Html.ValidationMessageFor(model => model.IsDeliveryOnlyToRegion)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.ReceiveQueriesByEmail)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.ReceiveQueriesByEmail)
                        @Html.ValidationMessageFor(model => model.ReceiveQueriesByEmail)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.Phone)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.Phone)
                        @Html.ValidationMessageFor(model => model.Phone)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.Phone2)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.Phone2)
                        @Html.ValidationMessageFor(model => model.Phone2)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.MobilePhone)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.MobilePhone)
                        @Html.ValidationMessageFor(model => model.MobilePhone)
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.LabelFor(model => model.EMail)
                    </td>
                    <td>
                        @Html.EditorFor(model => model.EMail)
                        @Html.ValidationMessageFor(model => model.EMail)
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <input type="submit" value="@T("Save changes")" />
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>
}

@section Styles{
}
@section Scripts{
    <script type="text/javascript" language="javascript" src="~/Scripts/query.js"> </script>
    <script type="text/javascript" src="~/Scripts/jquery.validate-vsdoc.js"> </script>
    <script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.min.js"> </script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            alert("city");

            $('#City').dictselect('@Url.Action("ByType", "Dictionaries", new { type = DictionaryType.Cities })', {
                setDefault: false
            });
        });
    </script>
}